package ch.ethz.group3.myalbum.client;

import ch.ethz.group3.myalbum.shared.GeoLocationModel;

import com.smartgwt.client.widgets.tile.TileRecord;

public class ImageTileRecord extends TileRecord {
	public ImageTileRecord(String imageId, String thumbnail, String imageUrl,
			String name, GeoLocationModel geoLocation, int commentCount) {
		setImageId(imageId);
		setThumbnail(thumbnail);
		setImageUrl(imageUrl);
		setName(name);
		setGeoLocation(geoLocation.toString());
		setCommentCount(commentCount);
	}

	public int getCommentCount() {
		return getAttributeAsInt("commentCount");
	}

	private void setCommentCount(int commentCount) {
		setAttribute("commentCount", commentCount);
	}

	public String getGeoLocation() {
		return getAttributeAsString("geoLocation");
	}

	private void setGeoLocation(String geoLocation) {
		setAttribute("geoLocation", geoLocation);
	}

	private void setImageUrl(String imageUrl) {
		setAttribute("imageUrl", imageUrl);
	}

	public String getThumbnail() {
		return getAttributeAsString("thumbnail");
	}

	private void setThumbnail(String thumbnail) {
		setAttribute("thumbnail", thumbnail);
	}

	public String getImageId() {
		return getAttributeAsString("imageId");
	}

	private void setImageId(String imageId) {
		setAttribute("imageId", imageId);
	}

	public void setName(String name) {
		setAttribute("name", name);
	}

	public String getName() {
		return getAttribute("name");
	}
}
